/* * Copyright (c) 2024 Beijing University of Posts and Telecommunications.
 * * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at  
 * * http://www.apache.org/licenses/LICENSE-2.0  
 * * Unless required by applicable law or agreed to in writing, software  
 * distributed under the License is distributed on an "AS IS" BASIS,  
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and  
 * limitations under the License.
 */ 

import "console"

rule TestcaseRule_OpenHarmony_CVE_2024_42236
{
    meta:
        date = "2024-10" 
        file = "/dev/block/platform/fe310000.sdhci/by-name/boot_linux"

    strings:
        $fix = { 
            8B 02 00 54 14 01 00 B5 
            ?? ?? ?? ?? 
            01 98 81 52 E2 0F 80 52 00 
            ?? ?? ?? ?? 
            ?? 
            D6 97 F4 03 00 AA C0 01 00 B4 E0 03 14 AA E1 03 15 AA 
            ?? 
            ?? E9 97 
            C8 06 00 51 89 4A 68 38 3F 29 00 71 41 00 00 54 9F 6A 28 38 E0 03 1F 2A 74 02 00 F9 04 00 00 14 A0 02 80 12 
        }

    condition:
        $fix and console.log("CVE-2024-42236 testcase pass") 
}